home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / gnat1792.zip / gnat179b / t-adainc / a-numaux.ads < prev    next >
Text File  |  1994-05-19  |  4KB  |  77 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUNTIME COMPONENTS                          --
  4. --                                                                          --
  5. --                     A D A . N U M E R I C S . A U X                      --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                           (C Library Version)                            --
  9. --                                                                          --
  10. --                            $Revision: 1.3 $                              --
  11. --                                                                          --
  12. --           Copyright (c) 1992,1993,1994 NYU, All Rights Reserved          --
  13. --                                                                          --
  14. -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  15. -- terms of the  GNU General Public License as published  by the Free Soft- --
  16. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  17. -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  18. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  19. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  20. -- for  more details.  You should have  received  a copy of the GNU General --
  21. -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
  22. -- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. --  This package provides the basic computational interface for the generic
  27. --  elementary functions. The C library version interfaces with the routines
  28. --  in the C mathematical library, and is thus quite portable, although it may
  29. --  not necessarily meet the requirements for accuracy in the numerics annex.
  30. --  One advantage of using this package is that it will interface directly to
  31. --  hardware instructions, such as the those provided on the Intel 80x87.
  32.  
  33. package Ada.Numerics.Aux is
  34.  
  35.    subtype Double is Long_Float; -- implementation dependent
  36.  
  37.    function Sin (X : Double) return Double;
  38.    pragma Import (C, Sin, "sin");
  39.  
  40.    function Cos (X : Double) return Double;
  41.    pragma Import (C, Cos, "cos");
  42.  
  43.    function Tan (X : Double) return Double;
  44.    pragma Import (C, Tan, "tan");
  45.  
  46.    function Exp (X : Double) return Double;
  47.    pragma Import (C, Exp, "exp");
  48.  
  49.    function Sqrt (X : Double) return Double;
  50.    pragma Import (C, Sqrt, "sqrt");
  51.  
  52.    function Log (X : Double) return Double;
  53.    pragma Import (C, Log, "log");
  54.  
  55.    function Acos (X : Double) return Double;
  56.    pragma Import (C, Acos, "acos");
  57.  
  58.    function Asin (X : Double) return Double;
  59.    pragma Import (C, Asin, "asin");
  60.  
  61.    function Atan (X : Double) return Double;
  62.    pragma Import (C, Atan, "atan");
  63.  
  64.    function Sinh (X : Double) return Double;
  65.    pragma Import (C, Sinh, "sinh");
  66.  
  67.    function Cosh (X : Double) return Double;
  68.    pragma Import (C, Cosh, "cosh");
  69.  
  70.    function Tanh (X : Double) return Double;
  71.    pragma Import (C, Tanh, "tanh");
  72.  
  73.    function Pow (X, Y : Double) return Double;
  74.    pragma Import (C, Pow, "pow");
  75.  
  76. end Ada.Numerics.Aux;
  77.